

/**
* @file zero.c
* @brief 零指针测试
* @author zshare
* @version v1.0
* @date 2022-02-14
* @history  
*/


#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>

#define _log_
#ifdef _log_
	#define log_print(format, arg...) printf(format,## arg)
#else
	#define log_print(format, arg...) do{}while(0)
#endif
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#define nil NULL
#define FALSE 1
#define TRUE 0
#define CMD_GET_VERSION 0x01
#define pcalloc(x,size,type) do{ if((x = (type *)calloc(1,size)) == NULL){ return FALSE; } }while(0)
#define pfree(ptr) do{ if(ptr != NULL) { free(ptr); } ptr = NULL; }while(0)

typedef struct {
	u32 ida;
	u32 idb;
	u8 text[16];
}zero_st;

int main(){	
	printf("%ld.\n", (long int)&(((zero_st *)0)->ida));
	printf("%ld.\n", (long int)&(((zero_st *)0)->idb));
	printf("%ld.\n", (long int)&(((zero_st *)0)->text));
	//这里故意留一个错误
	printf("%ld.\n", (long int)((zero_st *)0)->idb);

	return 0;
}






